package cn.mesmile.activity.config.multi;

import org.activiti.bpmn.model.Activity;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior;
import org.activiti.engine.impl.bpmn.behavior.ParallelMultiInstanceBehavior;
import org.activiti.engine.impl.delegate.ActivityBehavior;

/**
 * @author zb
 * @date 2022/1/17 10:15
 * @Description
 */
public class WfParallelMultiInstanceActivityBehavior extends ParallelMultiInstanceBehavior {

    /**
     * @param activity
     * @param innerActivityBehavior
     * The original {@link ActivityBehavior} of the activity that will be wrapped inside this behavior.
     */
    public WfParallelMultiInstanceActivityBehavior(Activity activity, AbstractBpmnActivityBehavior innerActivityBehavior) {
        super(activity, innerActivityBehavior);
    }

    @Override
    protected int createInstances(DelegateExecution execution) {
        // 自定义多实例拦截器
        // 自定义逻辑

        return super.createInstances(execution);
    }

}
